<template>
  <div>
    <div class="nav-bar nav-hairline--bottom">
      <div class="nav-bar_content">
        <div class="nav-bar_left">
          <i class="iconfont header-abs-back" @click="goBack">&#xe6b9;</i>
          <span class="nav-bar_text">{{title}}</span>
        </div>
        <div class="nav-bar_right">
          <slot name="right">
            <span class="iconWrap">
              <i class="iconfont">&#xe601;</i>
              <i class="iconfont line">&#xe63a;</i>
              <i class="iconfont">&#xe600;</i>
            </span>
          </slot>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'CommonHeader',
  props: {
    title: {
      type: String,
      default: "江苏政务服务"
    }
  },
  data () {
    return {
      
    }
  },
  mounted () {
    
  },
  methods: {
    goBack() {
      window.history.back();
    }
  },
}
</script>

<style lang="less" scoped>
  @import '~styles/varibles.less';
  .nav-bar  {
    position: relative;
    z-index: 99;
    height: @headerHeight;
    user-select: none;
    &_content {
      position: fixed;
      width: 100%;
      height: @headerHeight;
      display: flex;
      align-items: center;
      color: @darkTextColor;
      background-color: #fff;
      border-bottom: 1px solid #f3f3f3;
    }
    .header-abs-back {
      font-size: @navIconFontSize;
      margin-right: 10px;
    }
    &_left {
      left: 0;
    }
    &_right {
      right: 0;
    }
    &_left, &_right {
      position: absolute;
      top: 0;
      bottom: 0;
      display: flex;
      align-items: center;
      padding: 0 14px;
      font-size: @navFontSize;
      cursor: pointer;
    }
    &_right {
      .iconfont {
        font-size: @navIconFontSize;
      }
    }
    .iconWrap {
      display: flex;
      align-items: center;
      padding: 4px 10px;
      border: 0.5px solid #efefef;
      border-radius: 20px;
      .line {
        // margin: 0 6px;
        vertical-align: middle;
        color:#e3e3e3;
        font-size: 16px;
      }
    }
  }
  .nav-hairline--bottom::after {
    border-bottom-width: 1px;
    position: absolute;
    box-sizing: border-box;
    content: ' ';
    pointer-events: none;
    top: -50%;
    right: -50%;
    bottom: -50%;
    left: -50%;
    border: 0 solid #ebedf0;
    transform: scale(0.5);
  }
</style>
